﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%= Html.Encode(ViewData["Message"]) %></h2>
    <p>
        To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
    </p>
    
    
    <script type="text/javascript" src="../../Content/Javascript/jquery-1.2.6.pack.js"></script>    
    <script type="text/javascript" src="../../Content/Javascript/fckeditor/fckeditor.js"></script>    
    <script type="text/javascript" src="../../Content/Javascript/jquery.FCKEditor.js"></script>
    
    <script type="text/javascript">
    $(document).ready(function(){
        $.fck.config = {path: '/Content/Javascript/fckeditor/', height: 300 };
        $('textarea#content,textarea#description').fck();
    });
    
    function InsertContent()
    {   
        var sample = document.getElementById("sample").value;
        $.fck.insertHtml('fck1', sample);
    }
    
    function ShowContent()
    {       
        alert($.fck.content('fck1', ''));
    }
    
    function ClearContent()
    {        
        $.fck.clearHtml('fck1');
    }
    </script>
    
    <div>
        <input id="sample" type="text" /> 
        <input id="cmdInsert" type="button" value="Insert Content" onclick="InsertContent()" />
        &nbsp;
        <input id="cmdClear" type="button" value="Clear Content" onclick="ClearContent()" />
        <br /> <br />
        content<br/>
        <textarea id="content" cols="30" rows="10"></textarea>
        description<br />
        <textarea id="description" cols="30" rows="10"></textarea>
        <br />
        <br />
        <input id="cmdShow" type="button" value="Show Content" onclick="ShowContent()" />
    </div>    
    
</asp:Content>
